//#include <iostream>
//using namespace std;
#include "zhiyuanguanli.h"
#include "putongyuangong.h"
#include "jingli.h"
#include "boss.h"

int main()
{
//	//测试一下
//	Worker* worker = NULL;
//	worker = new Employee(1,"张三",1);
//	worker->showXinXi();
//	delete  worker; 
//	
//	worker = new Manager(2,"李四",2);
//	worker->showXinXi();
//	delete worker;
//	
//	worker = new Boss(3,"王五",3);
//	worker->showXinXi();
//	delete worker;
	 
    //实例化管理者对象
	WorkerGuanLi wg;
	int choice = 0;
	while(1)
	{
	//调用菜单接口展示菜单 
	wg.Show_Menu();
	cout <<  "请输入您的选择：";
	cin >> choice;
	switch(choice)
		{
			case 0:   //退出系统 
	    	wg.ExitSystem(); 
				break;
			case 1:   //增加职工 
			wg.Add_Emp();
				break;
			case 2:   //显示职工 
			wg.Show_Emp();
		 	   break;
			case 3:   //删除职工 
			wg.Del_Emp();
				break;
			case 4:   //修改职工 
			wg.Mod_Emp();
				break;
			case 5:   //查找职工
			wg.Find_Emp(); 
				break;
			case 6:   //排序职工 
			wg.Sort_Emp();
				break;
			case 7:   //清空文档 
			wg.Clean_File();
				break;
			default:
				system("cls");//清屏效果 
			    break;	
   	 	} 
	} 
	return 0;
}